#ifndef H_RCGD_STARTUP1_H
#define H_RCGD_STARTUP1_H 

#define     STARTUP_START                  0
#define     STARTUP_SELFTEST               1
#define     STARTUP_SET                    2
#define     STARTUP_WARM_START             3

#define		self_test_ROM			0
#define		self_test_ROM2			1
#define		self_test_RAM			3
#define		self_test_POWER			4
#define		self_test_OSC			5
#define		self_test_EB			6
#define		self_test_LED			7



#define     TEST_RAM                0
#define     TEST_ROM                1
#define     TEST_OCXO               4
#define     TEST_EB                 5


#define		START_CONFIG			0
#define		START_LOG				1
#define		START_OCXOID			2


#define		SELFTEST_RESULT_ROM		0x01
#define		SELFTEST_RESULT_RAM		0x02
#define		SELFTEST_RESULT_OCXO	0x04
#define		SELFTEST_RESULT_EB		0x08
#define		SELFTEST_RESULT_ANTENNA	0x10





/*=================================================================*/
/*                         startup.C                               */
/*=================================================================*/

typedef struct STARTUP_S{
    /* Startup step */
    BYTE   TEST_RESULT;
                                    /* 0: RAM                     */
                                    /* 1: ROM                     */
                                    /* 2: FPGA                    */
                                    /* 3: OCXO                    */
                                    /* 4: E/B                     */
                                    /* 5: Antenna                 */
                                    /* 6: reserved ( maybe Temperature sensor ) */
                                    /* 7: reserved                */
    char    MAINSTEP;
    char	SELFTEST;
	char	self_test_step;
	char 	ROM_TEST;
	int		IntervalCounter;
}STARTUP_;



extern STARTUP_  startup;


extern void    Init_STARTUP();
extern void    RunSelftestPassLED(void);
extern void    StartUpProcedure();

extern char CompleteTestRomRamFlag;

int StartUpSet();

#endif
